<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: ActiveScaffold::Actions::Nested</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">ActiveScaffold::Actions::Nested</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/active_scaffold/lib/actions/nested_rb.html">
                vendor/plugins/active_scaffold/lib/actions/nested.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
The <a href="Nested.html">Nested</a> module basically handles automatically
linking controllers together. It does this by creating column links with
the right parameters, and by providing any supporting systems (like a
/:controller/nested action for returning associated scaffolds).
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000297">do_nested</a>&nbsp;&nbsp;
      <a href="#M000299">include_habtm_actions</a>&nbsp;&nbsp;
      <a href="#M000295">included</a>&nbsp;&nbsp;
      <a href="#M000298">links_for_associations</a>&nbsp;&nbsp;
      <a href="#M000296">nested</a>&nbsp;&nbsp;
      <a href="#M000300">nested?</a>&nbsp;&nbsp;
      <a href="#M000302">nested_association</a>&nbsp;&nbsp;
      <a href="#M000301">nested_habtm?</a>&nbsp;&nbsp;
      <a href="#M000303">nested_parent_id</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name"><a href="Nested/ChildMethods.html">ActiveScaffold::Actions::Nested::ChildMethods</a></span>
      </div>
    </div>

    <div id="section">

    <div id="class-list">
      <h3 class="section-bar">Classes and Modules</h3>

      Module <a href="Nested/ChildMethods.html" class="link">ActiveScaffold::Actions::Nested::ChildMethods</a><br />

    </div>




      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000295" class="method-detail">
        <a name="M000295"></a>

        <div class="method-heading">
          <a href="#M000295" class="method-signature">
          <span class="method-name">included</span><span class="method-args">(base)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000295-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000295-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/nested.rb, line 5</span>
 5:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
 6:       <span class="ruby-keyword kw">super</span>
 7:       <span class="ruby-identifier">base</span>.<span class="ruby-identifier">before_filter</span> <span class="ruby-identifier">:include_habtm_actions</span>
 8:       <span class="ruby-comment cmt"># TODO: it's a bit wasteful to run this routine every page load.</span>
 9:       <span class="ruby-identifier">base</span>.<span class="ruby-identifier">before_filter</span> <span class="ruby-identifier">:links_for_associations</span>
10:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000296" class="method-detail">
        <a name="M000296"></a>

        <div class="method-heading">
          <a href="#M000296" class="method-signature">
          <span class="method-name">nested</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000296-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000296-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/nested.rb, line 12</span>
12:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nested</span>
13:       <span class="ruby-identifier">do_nested</span>
14: 
15:       <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span>
16:         <span class="ruby-identifier">type</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'nested'</span>, <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span> }
17:         <span class="ruby-identifier">type</span>.<span class="ruby-identifier">js</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'nested'</span>, <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span> }
18:       <span class="ruby-keyword kw">end</span>
19:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Protected Instance methods</h3>

      <div id="method-M000297" class="method-detail">
        <a name="M000297"></a>

        <div class="method-heading">
          <a href="#M000297" class="method-signature">
          <span class="method-name">do_nested</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
A simple method to find the record we&#8216;ll be nesting <b>from</b> May
be overridden to customize the behavior
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000297-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000297-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/nested.rb, line 25</span>
25:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_nested</span>
26:       <span class="ruby-ivar">@record</span> = <span class="ruby-identifier">find_if_allowed</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>], <span class="ruby-identifier">:read</span>)
27:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000299" class="method-detail">
        <a name="M000299"></a>

        <div class="method-heading">
          <a href="#M000299" class="method-signature">
          <span class="method-name">include_habtm_actions</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000299-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000299-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/nested.rb, line 53</span>
53:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include_habtm_actions</span>
54:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nested_habtm?</span>
55:         <span class="ruby-comment cmt"># Production mode is ok with adding a link everytime the scaffold is nested - we ar not ok with that.</span>
56:         <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>.<span class="ruby-identifier">add</span>(<span class="ruby-value str">'new_existing'</span>, <span class="ruby-identifier">:label</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Add Existing'</span>, <span class="ruby-identifier">:type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:table</span>, <span class="ruby-identifier">:security_method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:add_existing_authorized?</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>[<span class="ruby-value str">'new_existing'</span>]
57:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">nested</span>.<span class="ruby-identifier">shallow_delete</span>
58:           <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>.<span class="ruby-identifier">add</span>(<span class="ruby-value str">'destroy_existing'</span>, <span class="ruby-identifier">:label</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Remove'</span>, <span class="ruby-identifier">:type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:record</span>, <span class="ruby-identifier">:confirm</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Are you sure?'</span>, <span class="ruby-identifier">:method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:delete</span>, <span class="ruby-identifier">:position</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">:security_method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:delete_existing_authorized?</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>[<span class="ruby-value str">'destroy_existing'</span>]
59:           <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;destroy&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>[<span class="ruby-value str">'destroy'</span>]
60:         <span class="ruby-keyword kw">end</span>
61:         
62:         <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">module_eval</span> <span class="ruby-keyword kw">do</span>
63:           <span class="ruby-identifier">include</span> <span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">Actions</span><span class="ruby-operator">::</span><span class="ruby-constant">Nested</span><span class="ruby-operator">::</span><span class="ruby-constant">ChildMethods</span>
64:           <span class="ruby-comment cmt"># we need specifically to tell action_controller to add these public methods as action_methods</span>
65:           <span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">Actions</span><span class="ruby-operator">::</span><span class="ruby-constant">Nested</span><span class="ruby-operator">::</span><span class="ruby-constant">ChildMethods</span>.<span class="ruby-identifier">public_instance_methods</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">action_methods</span>.<span class="ruby-identifier">add</span> <span class="ruby-identifier">m</span> }
66:         <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">included_modules</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">Actions</span><span class="ruby-operator">::</span><span class="ruby-constant">Nested</span><span class="ruby-operator">::</span><span class="ruby-constant">ChildMethods</span>)
67:       <span class="ruby-keyword kw">else</span>
68:         <span class="ruby-comment cmt"># Production mode is caching this link into a non nested scaffold</span>
69:         <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">'new_existing'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>[<span class="ruby-value str">'new_existing'</span>]
70:         
71:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">nested</span>.<span class="ruby-identifier">shallow_delete</span>
72:           <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;destroy_existing&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>[<span class="ruby-value str">'destroy_existing'</span>]
73:           <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>.<span class="ruby-identifier">add</span>(<span class="ruby-value str">'destroy'</span>, <span class="ruby-identifier">:label</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Delete'</span>, <span class="ruby-identifier">:type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:record</span>, <span class="ruby-identifier">:confirm</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Are you sure?'</span>, <span class="ruby-identifier">:method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:delete</span>, <span class="ruby-identifier">:position</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">:security_method</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:delete_existing_authorized?</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">action_links</span>[<span class="ruby-value str">'destroy'</span>]
74:         <span class="ruby-keyword kw">end</span>
75:         
76:       <span class="ruby-keyword kw">end</span>
77:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000298" class="method-detail">
        <a name="M000298"></a>

        <div class="method-heading">
          <a href="#M000298" class="method-signature">
          <span class="method-name">links_for_associations</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
<a href="Create.html">Create</a> the automatic column links. Note that this
has to happen when configuration is <b>done</b>, because otherwise the <a
href="Nested.html">Nested</a> module could be disabled. Actually, it could
still be disabled later, couldn&#8216;t it? TODO: This should really be a
post-config routine, instead of a before_filter.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000298-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000298-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/nested.rb, line 31</span>
31:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">links_for_associations</span>
32:       <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">columns</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span><span class="ruby-operator">|</span>
33:         <span class="ruby-comment cmt"># if column.link == false we won't create a link. that's how a dev can suppress the auto links.</span>
34:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">link</span>.<span class="ruby-identifier">nil?</span>
35:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">plural_association?</span>
36:             <span class="ruby-comment cmt"># note: we can't create nested scaffolds on :through associations because there's no reverse association.</span>
37:             <span class="ruby-identifier">column</span>.<span class="ruby-identifier">set_link</span>(<span class="ruby-value str">'nested'</span>, <span class="ruby-identifier">:parameters</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:associations</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_sym</span>}) <span class="ruby-comment cmt">#unless column.through_association?</span>
38:           <span class="ruby-keyword kw">elsif</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">polymorphic_association?</span>
39:             <span class="ruby-identifier">parent_controller</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:controller</span>]
40:             <span class="ruby-keyword kw">begin</span>
41:               <span class="ruby-identifier">controller</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">active_scaffold_controller_for</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">klass</span>)
42:             <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">ControllerNotFound</span>
43:               <span class="ruby-keyword kw">next</span>
44:             <span class="ruby-keyword kw">end</span>
45:             <span class="ruby-comment cmt"># TODO: allow both update and show</span>
46:             <span class="ruby-comment cmt"># TODO: check whether ('show' || 'update') is included on remote controller</span>
47:             <span class="ruby-identifier">column</span>.<span class="ruby-identifier">set_link</span>(<span class="ruby-value str">'show'</span>, <span class="ruby-identifier">:controller</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">controller_path</span>, <span class="ruby-identifier">:parameters</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:parent_controller</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:controller</span>]})
48:           <span class="ruby-keyword kw">end</span>
49:         <span class="ruby-keyword kw">end</span>
50:       <span class="ruby-keyword kw">end</span>
51:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000300" class="method-detail">
        <a name="M000300"></a>

        <div class="method-heading">
          <a href="#M000300" class="method-signature">
          <span class="method-name">nested?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000300-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000300-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/nested.rb, line 79</span>
79:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nested?</span>
80:       <span class="ruby-operator">!</span><span class="ruby-identifier">params</span>[<span class="ruby-identifier">:nested</span>].<span class="ruby-identifier">nil?</span>
81:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000302" class="method-detail">
        <a name="M000302"></a>

        <div class="method-heading">
          <a href="#M000302" class="method-signature">
          <span class="method-name">nested_association</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000302-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000302-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/nested.rb, line 93</span>
93:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nested_association</span>
94:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">active_scaffold_constraints</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nested?</span>
95:       <span class="ruby-keyword kw">nil</span>
96:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000301" class="method-detail">
        <a name="M000301"></a>

        <div class="method-heading">
          <a href="#M000301" class="method-signature">
          <span class="method-name">nested_habtm?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000301-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000301-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/nested.rb, line 83</span>
83:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nested_habtm?</span>
84:       <span class="ruby-keyword kw">begin</span>
85:         <span class="ruby-identifier">a</span> = <span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">columns</span>[<span class="ruby-identifier">nested_association</span>]
86:         <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">macro</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:has_and_belongs_to_many</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">nested?</span>
87:         <span class="ruby-keyword kw">false</span>
88:       <span class="ruby-keyword kw">rescue</span>
89:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">MalformedConstraint</span>, <span class="ruby-identifier">constraint_error</span>(<span class="ruby-identifier">active_scaffold_config</span>.<span class="ruby-identifier">model</span>, <span class="ruby-identifier">nested_association</span>), <span class="ruby-identifier">caller</span>
90:       <span class="ruby-keyword kw">end</span>
91:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000303" class="method-detail">
        <a name="M000303"></a>

        <div class="method-heading">
          <a href="#M000303" class="method-signature">
          <span class="method-name">nested_parent_id</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000303-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000303-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/nested.rb, line 98</span>
 98:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nested_parent_id</span>
 99:       <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">active_scaffold_constraints</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nested?</span>
100:       <span class="ruby-keyword kw">nil</span>
101:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>